/**
 * This class provides the modal Ext.Window support for all Authentication forms.
 * It's layout is structured to center any Authentication dialog within it's center,
 * and provides a backGround image during such operations.
 */
Ext.define('Monkey.view.component.PictureWindow', {
    extend: 'Ext.window.Window',
    xtype: 'picturewindow',

    closable: true,
    resizable: true,
    constrain: true,
    constrainHeader: true,
    modal: true,
    frameHeader: true,
    //frame: true,
    maximizable: true,
    title: '查看图片',
    iconCls: 'picture',
    width: 600,
    height: 500,
    config: {
        src: ''
    },
    initComponent: function () {
        var src = '/resources/images/no-image.png';
        if (!Ext.isEmpty(this.config.src)) {
            src = this.config.src;
        }
        this.items = [{
            width: '100%',
            reference: 'prevImg',
            xtype: 'image',
            src: src,
            alt: '模版预览图片'
        }];
        this.callParent();
    }
});
